//package com.groupbuying.payproducer.orderpay.controller;
//
//import com.groupbuying.payproducer.orderpay.service.OrderPayService;
//import com.groupbuying.payproducer.orderpay.utils.RequestParamMap;
//import com.groupbuying.payproducer.orderpay.utils.Result;
//import com.groupbuying.payproducer.orderpay.utils.ReturnCodeEnum;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.servlet.http.HttpServletRequest;
//import java.util.Map;
//
///**
// * @Author gxy
// * @Description 订单支付中心相关接口
// * @Date 2019/2/16 9:21
// **/
//@RestController
//@RequestMapping("orderPay")
//public class OrderPayController {
//
//    @Autowired
//    private OrderPayService orderPayService;
//
//    @ApiOperation(value = "生成微信支付预支付信息接口", notes = "通过订单编号用户id 、支付主单号、openid、订单类型、应付金额、token信息生成微信与支付信息 ")
//    @RequestMapping(value = "/weiXinPrePaymentMsg", method = RequestMethod.POST)
//    public Result weiXinPrePaymentMsg(HttpServletRequest request){
//        Result result = new Result();
//        Map<String, String> paramsMap = RequestParamMap.getParameterMap(request);
//        if(paramsMap.get("customerUuid") == null
//                || paramsMap.get("payMainNo") == null
//                || paramsMap.get("open_id") == null
//                || paramsMap.get("orderType") == null
//                || paramsMap.get("total_fee") == null ){
//            result.setCode(ReturnCodeEnum.PARAMNULL.getKey());
//            result.setMassege(ReturnCodeEnum.PARAMNULL.getValue());
//            return result;
//        }
//        result = orderPayService.weiXinPrePaymentMsg(paramsMap);
//        return result;
//    }
//
//    @ApiOperation(value = "获取支付信息列表接口", notes = "通过订单编号用户id 、支付主单号、openid、获取支付信息 ")
//    @RequestMapping(value = "/getOrderPayMainList", method = RequestMethod.POST)
//    public Result getOrderPayMainList(HttpServletRequest request){
//        Result result = new Result();
//        Map<String, Object> paramsMap = RequestParamMap.getParameterMap(request);
//        result = orderPayService.getOrderPayMainList(paramsMap);
//        return result;
//    }
//
//}
